<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
//后台开始
//登陆
Route::get('/login',"Admin\LoginController@login");
Route::post('/dologin',"Admin\LoginController@dologin");
//注销
Route::get('/outlogin',"Admin\LoginController@outlogin");
//后台主页
Route::get('/',"Admin\AdminController@index")->middleware('adminlogin');
Route::get('/index',"Admin\AdminController@index")->middleware('adminlogin');
//手机管理
Route::resource("/phone","Admin\PhoneController")->middleware('adminlogin');
//放单人工资详情
Route::get("/finfo","Admin\FuserController@finfo")->middleware('adminlogin');
//管理员用户管理
Route::resource("/user","Admin\UserController")->middleware('adminlogin');
//日志管理
Route::resource("/log","Admin\LogController")->middleware('adminlogin');
//底薪添加
Route::get("/adddixin","Admin\DixinController@adddixin");
Route::get("/doadddixin","Admin\DixinController@doadddixin");
//任务管理
Route::group(['middleware' => 'adminlogin'], function(){
	Route::resource("/member","Admin\MemberController");
	//搜索
	Route::post("/memb","Admin\MemberController@index");
	// 导入
	Route::post("/daoru","Admin\MemberController@daoru");
	//导出页面
	Route::get("/dao","Admin\MemberController@dao");
	//导出
	Route::post("/daochu","Admin\MemberController@daochu");
	//手动分页
	Route::get("/page_pro","Admin\MemberController@page_pro");
	//批量删除
	Route::get("/del","Admin\MemberController@del");
	//zip打包
	Route::get("/zip","Admin\MemberController@zip");
	// 批量修改
	Route::get("/pledit","Admin\MemberController@pledit");
});
//银行卡管理
Route::group(['middleware' => 'adminlogin'], function(){
	Route::resource("/card","Admin\CardController");
	//修改
	Route::get("/stacard","Admin\CardController@stacard");
});
//商店管理
Route::group(['middleware' => 'adminlogin'], function(){
	Route::resource("/shop","Admin\ShopController");
	Route::get("/page_pro_shop","Admin\ShopController@page_pro_shop");
	//商店搜索
	Route::post("/spsearch","Admin\ShopController@index");
});
//放单人管理
Route::group(['middleware' => 'adminlogin'], function(){
	Route::resource("/fuser","Admin\FuserController");
});
//制度值日表
Route::group(['middleware' => 'adminlogin'], function(){
	Route::resource("/zhidu","Admin\ZhiController");
	Route::get("/zhidus","Admin\ZhiController@zhidu");
	//导出
	Route::get('/zhiridaochuview', "Admin\ZhiController@zhiriview");
	//店铺汇总表
	Route::get('/szhidu',"Admin\ZhiController@szhidu");
	Route::post('/szhidu',"Admin\ZhiController@szhidu");
	//导出页面
	Route::get('/shopdaochu',"Admin\ZhiController@shopdaochu");
	//导出操作
	Route::post('/doshopdaochu',"Admin\ZhiController@doshopdaochu");
});
//货号管理
Route::group(['middleware' => 'adminlogin'], function(){
	Route::resource("/huohao","Admin\HuohaoController");
	Route::get("/page_pro_huohao","Admin\HuohaoController@page_pro_huohao");
	//货号搜索
	Route::post("/hhsearch","Admin\HuohaoController@index");
});
//售后管理
Route::group(['middleware' => 'adminlogin'], function(){
	Route::resource("/saled","Admin\SaledController");
	Route::post("/saled","Admin\SaledController@index");
	Route::get("/page_pro_saled","Admin\SaledController@page_pro_saled");
	//导出
	Route::get("/saled_daochu","Admin\SaledController@saled_daochu");
	Route::post("/dosaled_daochu","Admin\SaledController@dosaled_daochu");
	//售后单条添加
	Route::post("/saledadd","Admin\SaledController@saledadd");
	//试用表转售后
	Route::get("/m_saled","Admin\SaledController@m_saled");
});
//后台权限管理
Route::group(['middleware' => 'adminlogin'], function(){
	//角色分配
	Route::get("/rolelist/{id}","Admin\RolelistController@rolelist");
	//保存角色
	Route::post("/saverole","Admin\RolelistController@saverole");
	//角色管理
	Route::resource("/role","Admin\RolelistController");
	//分配权限
	Route::get("/auth/{id}","Admin\RolelistController@auth");
	//保存权限
	Route::post("/saveauth","Admin\RolelistController@saveauth");
	//节点管理
	Route::resource("/node","Admin\NodeController");
});
//银行卡充值管理
Route::group(['middleware' => 'adminlogin'], function(){
	Route::resource("/addcard","Admin\AddCardController");
	//添加
	Route::get("/addd","Admin\AddCardController@addd");
	//删除
	Route::get("/acddel","Admin\AddCardController@acddel");
});
//薪资管理
Route::group(['middleware' => 'adminlogin'], function(){
	//1.人员页面展示
	Route::resource("/xinzi","Admin\XinziController");
	//结算页面
	Route::get("/jiesuan","Admin\XinziController@jiesuan");
	Route::get("/dojiesuan","Admin\XinziController@dojiesuan");
	//结算工资表详情
	Route::get("/jiesuaninfo","Admin\XinziController@jiesuaninfo");
	Route::get("/jiesuandel","Admin\XinziController@jiesuandel");
});
//红包管理
Route::group(['middleware' => 'adminlogin'], function(){
	Route::resource("/hongbao","Admin\HongbaoController");
	//添加红包
	Route::get("/addhongbao","Admin\HongbaoController@addhongbao");
	Route::get("/dohongbao","Admin\HongbaoController@dohongbao");
	//修改红包
	Route::get("/edithongbao","Admin\HongbaoController@edithongbao");
	Route::get("/doedithongbao","Admin\HongbaoController@doedithongbao");
	//删除红包
	Route::get("/delhongbao","Admin\HongbaoController@delhongbao");
});
//值班管理
Route::group(['middleware' => 'adminlogin'], function(){
	Route::resource("/zhiban","Admin\ZhibanController");
	//值班添加
	Route::get("/addzhiban","Admin\ZhibanController@addzhiban");
	Route::get("/doaddzhiban","Admin\ZhibanController@doaddzhiban");
	//值班修改
	Route::get("/editzhiban","Admin\ZhibanController@editzhiban");
	Route::get("/doeditzhiban","Admin\ZhibanController@doeditzhiban");
	//值班删除
	Route::get("/delzhiban","Admin\ZhibanController@delzhiban");
});
//惩罚管理
Route::group(['middleware' => 'adminlogin'], function(){
	Route::resource("/fakuan","Admin\FakuanController");
	//新增罚款
	Route::get("/addfakuan","Admin\FakuanController@addfakuan");
	Route::get("/doaddfakuan","Admin\FakuanController@doaddfakuan");
	//修改罚款
	Route::get("/editfakuan","Admin\FakuanController@editfakuan");
	Route::get("/doeditfakuan","Admin\FakuanController@doeditfakuan");
	//删除罚款
	Route::get("/delfakuan","Admin\FakuanController@delfakuan");
});
//后台结束
//前台开始
//登录注册
Route::get('/homelogin', "Home\LoginController@login");
//注册
Route::get('/homeregister', "Home\LoginController@register");
Route::post('/dohomeregister', "Home\LoginController@doregister");
//主页
Route::get('/homeindex', "Home\HomeController@index");
Route::post('/dohomelogin', "Home\LoginController@dologin");
//店铺
Route::get('/h_shop', "Home\ShopController@index");
//店铺添加页面
Route::get('/h_s_add', "Home\ShopController@add");
Route::post('/h_s_doadd', "Home\ShopController@doadd");

